<template>
  <div class="home-banner">
    <XtxSlider :sliders='BannerList'></XtxSlider>
  </div>
</template>

<script>
import { ref } from 'vue'
import { HomeBannerApi } from '@/api/home.js'
export default {
  setup () {
    const BannerList = ref([])
    HomeBannerApi().then((res) => {
      BannerList.value = res.result
    })
    return {
      BannerList
    }
  }
}
</script>
<style lang='less'>
 .home-banner {
   position: absolute;
  width: 1240px;
  height: 450px;
  left: 0;
  top: 0;
  z-index: 98;
 }
</style>
